/**
*  Copyright 2009-2014 by WWW.KNET.CN  All rights reserved.
*/
package com.domain.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.ModelMap;

import com.domain.model.Sysuser;
import com.domain.util.varUtil;


/**
 * TODO(这里用一句话描述这个类的作用)
 * @author liujie
 * @date 2015年4月16日 下午2:14:58
 * 
 */
public class SuperController {
	private static final Logger logger = LoggerFactory.getLogger(SuperController.class);
	public static final String CURRENT_LOGIN_USER = "currentLoginUser";
	public static final String PAGE_NAME = "page";
	public static final String PAGESIZE_NAME = "pagesize";
	public static final int PAGE = 1;
	public static final int PAGESIZE = 20;
	private String basePath;
	/**
	 * 获取代理之后的 ip
	 * 
	 * @param request
	 * @return
	 */
	public String getRemoteIP(HttpServletRequest request) {
		String ip = request.getHeader("x-forwared_for");
		if (StringUtils.isNotBlank(ip)) {
			return ip;
		}
		ip = request.getRemoteAddr();
		return ip;
	}
    public void reqInfo(ModelMap model,String porCode,String type){
    	model.addAttribute("porCode", porCode);
    	model.addAttribute("type", type);
    }
    
 
}
